<div id="column-left" style="background: url(/images/leftshop.png) repeat-y;padding: 0px 35px 10px 0px;margin-left: -10px;">
    <div class="widget">
        <h4 class="widget-title">Категории</h4>
        <div class="widget-content">
            {if $glav} <div style="padding: 5px 10px 5px 50px;background: #ececec;text-decoration: none;display: block;
                 color: #333;border-bottom: 1px solid #ccc;border-top: 1px solid #fff;position: relative;text-shadow: 1px 1px 1px #fff;">
                    <a id="{$glav->getId()}" href="{geturl route="categorylist" cat=$glav->alias}">{$glav->name} ({$glav->count})</a></div>{/if}

                <div class="dcjq-accordion" id="dc_jqaccordion_widget-2-item">
                    <ul id="menu-cat" class="menu">

                        {foreach from=$categories item=category}
                            {if $category->child}
                                <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-{$category->getId()} dcjq-parent-li">
                                    {if $glav} 
                                        <a id="{$category->getId()}" href="{geturl route="categorylistsub" cat=$glav->alias subcat=$category->alias}" class="dcjq-parent">
                                        {else}
                                            <a id="{$category->getId()}" href="{geturl route="categorylist" cat=$category->alias}" class="dcjq-parent">
                                            {/if}
                                            {$category->name} ({$category->count})
                                            <span class="dcjq-icon"></span>
                                        </a>
                                        <ul class="sub-menu" style="display: none;">
                                            {foreach from=$category->child item=child}
                                                {if $child->child}
                                                    <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-{$child->getId()}">
                                                        {if $glav} 
                                                            <a id="{$child->getId()}" href="{geturl route="categorylistsub" cat=$glav->alias subcat=$category->alias subsubcat=$child->alias}" style="font-style: normal; font-size: 12px; color: #9f3946 !important; padding-left: 29px;">

                                                            {else}
                                                                <a id="{$child->getId()}" href="{geturl route="categorylistsub" cat=$category->alias subcat=$child->alias}" style="font-style: normal; font-size: 12px; color: #9f3946 !important; padding-left: 29px;">

                                                                {/if}

                                                                <img class="sarrow" src="/images/grey-marker-closed.png" id="subarrow-{$child->getId()}" class="subarrow" />
                                                                {$child->name} ({$child->count})

                                                            </a>
                                                            <ul class="sub-menu" style="display: none;">
                                                                {foreach from=$child->child item=value}
                                                                    {if $value->child}

                                                                        <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-{$value->getId()}">
                                                                            <a id="{$value->getId()}" href="{geturl route="categorylistsubsub" cat=$category->alias subcat=$child->alias subsubcat=$value->alias}" style="font-style: normal; font-size: 12px; color: #9f3946 !important; padding-left: 50px;">
                                                                                <img class="sarrow" src="/images/grey-marker-closed.png" id="subarrow-{$value->getId()}" class="subarrow" />
                                                                                {$value->name} ({$value->count})
                                                                            </a>
                                                                            <ul class="sub-menu" style="display: none;">
                                                                                {foreach from=$value->child item=last_level}

                                                                                    <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-{$last_level->getId()}">
                                                                                        <a id="{$last_level->getId()}" href="{geturl route="categorylistsubsubsub" cat=$category->alias subcat=$child->alias subsubcat=$value->alias subsubsubcat=$last_level->alias}" style="font-style: normal; font-size: 11px; color: #80242f !important; padding-left: 71px;">
                                                                                            {$last_level->name} ({$_->count})
                                                                                        </a>
                                                                                    </li>
                                                                                {/foreach}
                                                                            </ul>
                                                                        </li>
                                                                    {else}
                                                                        <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-{$value->getId()}">
                                                                            <a id="{$value->getId()}" href="{geturl route="categorylistsubsub" cat=$category->alias subcat=$child->alias subsubcat=$value->alias}" style="font-style: normal; font-size: 11px; color: #80242f !important; padding-left: 50px;">
                                                                                {$value->name} ({$value->count})
                                                                            </a>
                                                                        </li>
                                                                    {/if}
                                                                {/foreach}
                                                            </ul>
                                                    </li>
                                                {else}
                                                    <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-{$child->getId()}">
                                                        {if $glav} 
                                                            <a id="{$child->getId()}" href="{geturl route="categorylistsubsub" cat=$glav->alias subcat=$category->alias subsubcat=$child->alias}" style="font-style: normal; font-size: 12px; color: #9f3946 !important; ">

                                                            {else}
                                                                <a id="{$child->getId()}" href="{geturl route="categorylistsub" cat=$category->alias subcat=$child->alias}" style="font-style: normal; font-size: 12px; color: #9f3946 !important; ">

                                                                {/if}    

                                                                {$child->name} ({$child->count})
                                                            </a>
                                                    </li>
                                                {/if}
                                            {/foreach}
                                        </ul>
                                </li>
                            {else}
                                <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-{$category->getId()}">

                                    {if $glav} 
                                        <a id="{$category->getId()}" href="{geturl route="categorylistsub" cat=$glav->alias subcat=$category->alias}" >
                                        {else}
                                            <a id="{$category->getId()}" href="{geturl route="categorylist" cat=$category->alias}" >
                                            {/if}
                                            {$category->name} ({$category->count})
                                        </a>
                                </li>
                            {/if}
                        {/foreach}
                    </ul>		
                </div>

            </div>
            <!-- end .widget-content-->
        </div>
        {if $widget=='1'}                    
            {include file="index/widget.tpl"}              
        {elseif $widget=='2'}
            {include file="index/filter.tpl"}    
        {/if}
    </div>